/**
 * Created by Salted fish
 * Description:
 * User: 24539
 * Date：2021-08-05
 * Time: 16:46
 */
class  Student{
    private String Myname;
    public int age;
//提供个接口
    public String getName() {
        return Myname;
    }
    public void setName(String Myname) {
        this.Myname = Myname;
    }
    public void show() {
        System.out.println("我的名字是"+Myname+",年龄是"+age);
    }

        }
public class Test2 {
    public static void main(String[] args) {
        Student sn= new Student();
        sn.setName("xiaoming");
        System.out.println(sn.getName());
    }
}
